import { createRouter, createWebHistory } from 'vue-router'
// 开启历史模式
const routes = [
  {
    name: 'layout',
    title: '客户端布局',
    component: () => import('@/views/layout/index.vue'),
    redirect: '/home', // 重定向到home页面
    children: [
      {
        path: '/home',
        name: 'home',
        title: '首页',
        component: () => import('@/views/home/index.vue')
      }
    ]
  }
]
const router = createRouter({
  history: createWebHistory(),
  routes
})

export default router
